#!/usr/bin/env bash

ffmpeg -i Imagine.webm -vf 'crop=iw:ih-257*2:0:257' -c:v h264 -c:a aac -b:v 64000k -b:a 320k -y Imagine.mp4

ffmpeg -hide_banner -i Imagine.mp4 -i wmada.png \
  -filter_complex '[0][1]overlay=main_w-overlay_w-20:20[a];[a]pad=iw:iw*9/16:0:(oh-ih)/2:black[out]' \
  -map "[out]:v" -map 0:a \
  -s:0 hd720 -b:v:0 2496k -b:a:0 64k \
  -f mp4 watermark.mp4